<template>
	<view class="">
		<uni-popup ref="model" type="center">
			<view class="bg-color-w b-radius-5 padding-12 p-r" :style="{'top': top+'px'}" style="width: 80vw;">
				<view class="padding-tb6"></view>
				<view class="flex f-a-c f-j-c f18-size f-w-500">{{content}}</view>
				<slot>
					<view class="padding-30"></view>
				</slot>
				<view class="flex">
					<view @click="$refs.model.close()" class="flex f-a-c f-j-c flex-1 h-44 b-radius-2 b-color-e f18-size margin-r12">{{cancelText}}</view>
					<view @click="sure" class="flex f-a-c f-j-c flex-1 h-44 b-radius-2 b-color-b bg-color-b t-color-w f18-size ">{{comfirmText}}</view>
				</view>
				<view class="padding-6"></view>
			</view>
		</uni-popup>
	</view>
</template>
<style scoped>
</style>
<script>
	const $ = require('../../utils/api.js');
	let self = this;
	export default {
		props:{
			content:{
				default: '是否确认转单'
			},
			cancelText:{
				default: '我在想想'
			},
			comfirmText:{
				default: '确认转单'
			},
			top: {
				default: 0
			},
			viewShow: {
				default: false
			}
		},
		components: {},
		data() {
			return {
			};
		},
		onLoad: function(options) {
			self = this;
			this.init();
		},
		onShow() {
		},
		methods: {
			open() {
				this.$refs.model.open();
			},
			sure() {
				this.$emit('confirm');
				if(!this.viewShow) {
					this.$refs.model.close();
				}
			},
			close() {
				this.$refs.model.close()
			},
			init() {},
		},
		computed: {},
		created() {
		},
		mounted() {},
		destroyed() {},
		onPullDownRefresh() {
		},
		onReachBottom() {
			
		}
	}
</script>